package com.smart.manager.finance.entities.models;


import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.finance.entities.enums.ApplyState;
import com.smart.manager.finance.entities.enums.ApplyType;
import com.smart.manager.pop.entities.views.InviterView;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.math.BigDecimal;

/**
 * 申请表
 * @author leo
 * @date 2023/08/09
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Accessors(chain = true)
@Data
public class FinancePopApply extends BaseLongModel {

    @ApiModelProperty("提现单号")
    private String code;

    @ApiModelProperty("提现类型")
    private ApplyType type;

    @ApiModelProperty("提现金额")
    private BigDecimal amount; // 金额

    @ApiModelProperty("提现状态")
    private ApplyState status; // 金额

    @ApiModelProperty("提现账号")
    @ManyToOne
    @JoinColumn(name = "agent" ,referencedColumnName = "id")
    private InviterView agent; // 触发账号

    @ApiModelProperty("提现备注")
    private String description; // 流水备注


}
